package com.tandewuyanzu.zoo;
import com.tandewuyanzu.animal.Animal;
import com.tandewuyanzu.dog.Dog;
import com.tandewuyanzu.unicorn.Unicorn;
import com.tandewuyanzu.humter.Hunter;
import  java.util.Scanner;

public class Tandewuyanzu {
    public static void main(String[] args) {

        String[] animalNames = {"1.超级猎人,2.叶,3.高傲的独角兽"};
        System.out.println(animalNames);
        for (String animal : animalNames) {
            System.out.println(animal);
            Scanner scan = new Scanner(System.in);
            System.out.println("0.为信息汇总,4.动物训练、基因修改、染发,请输入你的选择：");
            int num = scan.nextInt();
            while (num >= 0) {
                switch (num) {
                    case 0:
                        System.out.println("动物信息:");
                        System.out.println("代号007,1.超级猎人,有2条腿,喜欢哇哦,黄皮肤");
                        System.out.println("代号110,2.叶,有4条腿,经常旺旺旺，绿到发慌");
                        System.out.println("代号042,3，高傲的的独角兽,忧郁嘶嘶嘶，白得一匹");
                        break;
                    case 1:
                        Hunter superhunter = new Hunter();
                        superhunter.setId(007);
                        superhunter.setName("超级猎人");
                        superhunter.setLegnum(2);
                        superhunter.setShout("哇呜");
                        superhunter.setColor("黄皮肤");
                        System.out.println(superhunter);
                        break;
                    case 2:
                        Dog flydog = new Dog();
                        flydog.setId(110);
                        flydog.setName("叶");
                        flydog.setLegnum(4);
                        flydog.setShout("旺旺汪");
                        flydog.setColor("绿毛");
                        System.out.println(flydog);
                        System.out.println("我是会飞的小狗");
                        break;
                    case 3:
                        Unicorn proudunicorn = new Unicorn();
                        proudunicorn.setId(024);
                        proudunicorn.setName("高傲的独角兽");
                        proudunicorn.setLegnum(4);
                        proudunicorn.setShout("嘶嘶嘶");
                        proudunicorn.setColor("白色");
                        System.out.println(proudunicorn);
                        System.out.println("注定毁灭的都将归于永恒");
                        break;
                    case 4:
                        Scanner sc = new Scanner(System.in);
                        System.out.println("是否要继续修改数据：8、修改 ，其他数字退出：");
                        int change = sc.nextInt();
                        while(change==8) {
                            System.out.println("请输入训练后的动物新Id:");
                            long newId = sc.nextLong();
                            System.out.println("请输入训练前的动物名称 ：");
                            String oldName = sc.next();
                            System.out.println("请输入训练后动物的新名称：");
                            String newName = sc.next();
                            System.out.println("请输入基因修改后动物腿的数：");
                            int newlegnum = sc.nextInt();
                            System.out.println("请输入训练动物的新叫声:");
                            String newShout = sc.next();
                            System.out.println("请输入动物的新颜色:");
                            String newColor = sc.next();
                            Animal ani=new Animal();
                            ani.setId(newId);
                            ani.setName(newName);
                            ani.setLegnum(newlegnum);
                            ani.setShout(newShout);
                            ani.setColor(newColor);
                            System.out.println(ani);
                            System.out.println("是否要：8、修改 ，其他数字退出：");
                            change = sc.nextInt();
                        }
                        break;
                    default:
                        break;
                }
                System.out.println("输入其他数字退出，请再次输入你选择:");
                num = scan.nextInt();
            }

        }
    }
}
